Optimal. Leaf size=39 \[ \frac {a x}{c}+\frac {(b c-a d) \tan ^{-1}\left (\frac {\sqrt {c} x}{\sqrt {d}}\right )}{c^{3/2} \sqrt {d}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.02, antiderivative size = 39, normalized size of antiderivative = 1.00, number of steps
used = 3, number of rules used = 3, integrand size = 17, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.176, Rules used = {381, 396, 211}
\begin {gather*} \frac {(b c-a d) \text {ArcTan}\left (\frac {\sqrt {c} x}{\sqrt {d}}\right )}{c^{3/2} \sqrt {d}}+\frac {a x}{c} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 211
Rule 381
Rule 396
Rubi steps
\begin {align*} \int \frac {a+\frac {b}{x^2}}{c+\frac {d}{x^2}} \, dx &=\int \frac {b+a x^2}{d+c x^2} \, dx\\ &=\frac {a x}{c}-\frac {(-b c+a d) \int \frac {1}{d+c x^2} \, dx}{c}\\ &=\frac {a x}{c}+\frac {(b c-a d) \tan ^{-1}\left (\frac {\sqrt {c} x}{\sqrt {d}}\right )}{c^{3/2} \sqrt {d}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.03, size = 40, normalized size = 1.03 \begin {gather*} \frac {a x}{c}-\frac {(-b c+a d) \tan ^{-1}\left (\frac {\sqrt {c} x}{\sqrt {d}}\right )}{c^{3/2} \sqrt {d}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.04, size = 34, normalized size = 0.87
method | result | size |
default | \(\frac {a x}{c}+\frac {\left (-a d +b c \right ) \arctan \left (\frac {c x}{\sqrt {c d}}\right )}{c \sqrt {c d}}\) | \(34\) |
risch | \(\frac {a x}{c}-\frac {\ln \left (c x -\sqrt {-c d}\right ) a d}{2 c \sqrt {-c d}}+\frac {\ln \left (c x -\sqrt {-c d}\right ) b}{2 \sqrt {-c d}}+\frac {\ln \left (-c x -\sqrt {-c d}\right ) a d}{2 c \sqrt {-c d}}-\frac {\ln \left (-c x -\sqrt {-c d}\right ) b}{2 \sqrt {-c d}}\) | \(106\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.48, size = 33, normalized size = 0.85 \begin {gather*} \frac {a x}{c} + \frac {{\left (b c - a d\right )} \arctan \left (\frac {c x}{\sqrt {c d}}\right )}{\sqrt {c d} c} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 2.14, size = 98, normalized size = 2.51 \begin {gather*} \left [\frac {2 \, a c d x + {\left (b c - a d\right )} \sqrt {-c d} \log \left (\frac {c x^{2} + 2 \, \sqrt {-c d} x - d}{c x^{2} + d}\right )}{2 \, c^{2} d}, \frac {a c d x + {\left (b c - a d\right )} \sqrt {c d} \arctan \left (\frac {\sqrt {c d} x}{d}\right )}{c^{2} d}\right ] \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 82 vs.
\(2 (34) = 68\).
time = 0.30, size = 82, normalized size = 2.10 \begin {gather*} \frac {a x}{c} + \frac {\sqrt {- \frac {1}{c^{3} d}} \left (a d - b c\right ) \log {\left (- c d \sqrt {- \frac {1}{c^{3} d}} + x \right )}}{2} - \frac {\sqrt {- \frac {1}{c^{3} d}} \left (a d - b c\right ) \log {\left (c d \sqrt {- \frac {1}{c^{3} d}} + x \right )}}{2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.57, size = 33, normalized size = 0.85 \begin {gather*} \frac {a x}{c} + \frac {{\left (b c - a d\right )} \arctan \left (\frac {c x}{\sqrt {c d}}\right )}{\sqrt {c d} c} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.07, size = 32, normalized size = 0.82 \begin {gather*} \frac {a\,x}{c}-\frac {\mathrm {atan}\left (\frac {\sqrt {c}\,x}{\sqrt {d}}\right )\,\left (a\,d-b\,c\right )}{c^{3/2}\,\sqrt {d}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________